package com.xiongwei.chainOfResponsibility;

/**
 * @author XiongWei
 * @date 2024/2/6
 */
public class DepartmentApprover extends Approver{

    public DepartmentApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        if (request.getAmount() < 3000) {
            System.out.println("Approver: " + super.name + " approve the request");
        } else {
            approver.processRequest(request);
        }
    }
}
